<template>
    <base-breadcrumb>
        <div class="page-detail">
            <title-name size="24" title="风险要素"></title-name>
            <a-card>
                <title-name title="风险信息"></title-name>
                <a-descriptions>
                    <a-descriptions-item label="风险名称">{{ form1.riskName }}</a-descriptions-item>
                </a-descriptions>
                <a-descriptions>
                    <a-descriptions-item label="责任部门">{{ form1.orgName }}</a-descriptions-item>
                </a-descriptions>
                <a-descriptions>
                    <a-descriptions-item label="风险内容">{{ form1.riskContent }}</a-descriptions-item>
                </a-descriptions>
                <a-descriptions>
                    <a-descriptions-item label="一般风险">{{ form1.generalRisk }}</a-descriptions-item>
                </a-descriptions>
                <a-descriptions>
                    <a-descriptions-item label="较大风险">{{ form1.greaterRisk }}</a-descriptions-item>
                </a-descriptions>
                <a-descriptions>
                    <a-descriptions-item label="重大风险">{{ form1.majorRrisk }}</a-descriptions-item>
                </a-descriptions>
                <a-descriptions>
                    <a-descriptions-item label="创建人">{{ form1.creatorName }}</a-descriptions-item>
                    <a-descriptions-item label="创建时间">{{ form1.createTime|dateFormat }}</a-descriptions-item>
                </a-descriptions>
            </a-card>

            <div class="tar page-btn-right-top">
                <a-button @click="$close">关闭</a-button>
            </div>
        </div>
    </base-breadcrumb>
</template>

<script>

import otherTypeApi from '@/api/legal/branchContract/otherType'
import elementCheckListApi from '@/api/legal/risk/elementCheckList'

export default {
  name:'a'+Date.now(),
    data() {
        return {
            addFile: otherTypeApi.addFile(),
            deleteFile: otherTypeApi.deleteFile(),
            findFileList: otherTypeApi.findFileList(),
            form1: {},
            loading: false,
            id: this.$route.query.id
        }
    },
    watch: {},
    mounted: async function() {
        if (this.id) {
            await this.getData()
        }
    },
    methods: {
        async getData() {
            this.loading = true
            let res = await elementCheckListApi.findListByMainId({}, { id: this.$route.query.id })
            if (res.code === this.SUCCESS_CODE) {
                this.form1 = this.$assign(this.form1, res.data)
            }
            this.loading = false
        }

    }
}
</script>